package com.hrprojectback.dto;

import com.hrprojectback.enums.BaseEnum;
import com.hrprojectback.enums.StatusEnum;

import java.util.List;

/**
 * 请求响应数据
 */
public class Response {

    public static ResponseDTO success() {
        return new ResponseDTO(StatusEnum.SUCCESS);
    }

    public static ResponseDTO success(String message) {
        return new ResponseDTO(StatusEnum.SUCCESS.getCode(), message);
    }

    public static ResponseDTO success(Object data) {
        return new ResponseDTO(StatusEnum.SUCCESS, data);
    }

    public static ResponseDTO successStatus(Object data) {
        return new ResponseDTO(StatusEnum.STATUS_SHENG_XIAO_SUCCEE, data);
    }

    public static ResponseDTO successStatus2(Object data) {
        return new ResponseDTO(StatusEnum.STATUS_SHI_XIAO_SUCCEE, data);
    }


    public static ResponseDTO success(String message, Object data) {
        return new ResponseDTO(StatusEnum.SUCCESS.getCode(), message, data);
    }

    public static ResponseDTO error(String message) {
        return new ResponseDTO(StatusEnum.ERROR.getCode(), message);
    }

    public static ResponseDTO error() {
        return new ResponseDTO(StatusEnum.ERROR);
    }

    public static ResponseDTO error(Integer code, String message) {
        return new ResponseDTO(code, message);
    }

    public static ResponseDTO error2(Integer code, String message, Object data) {
        return new ResponseDTO(code, message, data);
    }

    public static ResponseDTO error(BaseEnum e) {
        return new ResponseDTO(e);
    }

    public static ResponseDTO error3(Integer code, String message, Object data) {
        return new ResponseDTO(code, message, data);
    }
}
